{{Extend "layout"}}
{{Block "title"}}{{"云存储账号列表"|$.T}}{{/Block}}
{{Block "breadcrumb"}}
{{Super}}
<li class="active">{{"云存储账号列表"|$.T}}</li>
{{/Block}}
{{Block "main"}}
<div class="row">
	<div class="col-md-12">
		<div class="block-flat no-padding">
			<div class="header">
				<a href="{{BackendURL}}/cloud/storage_add" class="btn btn-success pull-right">
					<i class="fa fa-plus"></i>
					{{"添加账号"|$.T}}
				</a>
				<h3>{{"云存储账号列表"|$.T}}</h3>
			</div>
			<div class="content">
				<div class="table-responsive">
				<table class="table no-border hover">
					<thead class="no-border">
						<tr>
							<th style="width:60px"><strong>ID</strong></th>
							<th><strong>{{"名称"|$.T}}</strong></th>
							<th style="width:80px"><strong>{{"类型"|$.T}}</strong></th>
							<th><strong>{{"Bucket"|$.T}}</strong></th>
							<th><strong>{{"Region"|$.T}}</strong></th>
							<th><strong>{{"Endpoint"|$.T}}</strong></th>
							<th style="width:60px"><strong>{{"HTTPS"|$.T}}</strong></th>
							<th style="width:130px"><strong>{{"创建/更新时间"|$.T}}</strong></th>
							<th style="width:170px" class="text-center"><strong>{{"操作"|$.T}}</strong></th>
						</tr>
					</thead>
					<tbody class="no-border-y">
                        {{range $k,$v := $.Stored.listData}}
						<tr>
							<td>{{$v.Id}}</td>
							<td>{{$v.Name}}</td>
							<td>{{$v.Type}}</td>
							<td>{{$v.Bucket}}</td>
							<td>{{$v.Region}}</td>
							<td>{{$v.Endpoint}}</td>
							<td>{{$v.Secure}}</td>
							<td>
								{{- if gt $v.Updated 0 -}}
								{{(Date $v.Updated).Format "2006-01-02 15:04:05"}}
								{{- else -}}
								{{(Date $v.Created).Format "2006-01-02 15:04:05"}}
								{{- end -}}
							</td>
							<td>
								<div class="label-group">
							<a title="{{`配置CORS规则`|$.T}}" class="label label-warning" href="{{BackendURL}}/cloud/storage_file?id={{$v.Id}}&do=corsRules" data-toggle="tooltip"><i class="fa fa-legal"></i></a>
							<a class="label label-default" href="{{BackendURL}}/cloud/storage_add?copyId={{$v.Id}}" title="{{`复制`|$.T}}" data-toggle="tooltip"><i class="fa fa-copy"></i></a>
							<a title="{{`连接`|$.T}}" class="label label-success" href="{{BackendURL}}/cloud/storage_file?id={{$v.Id}}" data-toggle="tooltip"><i class="fa fa-link"></i></a>
							<a title="{{`修改`|$.T}}" class="label label-primary" href="{{BackendURL}}/cloud/storage_edit?id={{$v.Id}}" data-toggle="tooltip"><i class="fa fa-pencil"></i></a>
							<a title="{{`删除`|$.T}}" class="label label-danger" href="{{BackendURL}}/cloud/storage_delete?id={{$v.Id}}" onclick="return confirm('{{`真的要删除吗？`|$.T}}');" data-toggle="tooltip"><i class="fa fa-times"></i></a>
								</div>
							</td>
						</tr>
                        {{end}}
					</tbody>
				</table>		
				</div>
				{{$.Stored.pagination.Render}}
			</div>
		</div>				
	</div>
</div>
{{/Block}}